<template>
    <div>
        <li v-for="p in list">{{ p.name }}--{{ p.age }}</li>
    </div>
</template>
<script setup lang="ts">
// 接收父组件传递参数
import { defineProps } from 'vue';
defineProps(['list'])
// 将一个类型规范为一个接口类型
import { type Person, type person1 } from '../type/Person'
let personList: Array<Person> = [
    {
        id: "001",
        name: "嘿嘿",
        age: 18
    }, {
        id: "002",
        name: "嘻嘻",
        age: 12
    }
]
let personList1: person1 = [
    {
        id: "001",
        name: "嘿嘿",
        age: 18
    }, {
        id: "002",
        name: "嘻嘻",
        age: 12
    }
]
console.log(personList, personList1);

</script>
